//
//  MYShopSearchScreenHeader.m
//  MuYing
//
//  Created by tbb on 2019/7/25.
//  Copyright © 2019 TBB. All rights reserved.
//

#import "MYShopSearchScreenHeader.h"

@implementation MYShopSearchScreenHeader

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.layer.shadowColor = HexColorA(0x000000, 0.6).CGColor;//RGB(70, 69, 69).CGColor;
    //2.设置阴影偏移范围
    self.layer.shadowOffset = CGSizeMake(0, 2);
    //3.设置阴影颜色的透明度
    self.layer.shadowOpacity = 0.07;
    
    //4.设置阴影半径
    self.layer.shadowRadius = 4;
    //5.设置阴影路径
    self.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.bounds].CGPath;
    
    self.contentView.backgroundColor = UIColor.whiteColor;
    self.synthesizeBtn.imagePosition = QMUIButtonImagePositionRight;
    self.synthesizeBtn.spacingBetweenImageAndTitle = 0;
    
    self.sellBtn.imagePosition = QMUIButtonImagePositionRight;
    self.sellBtn.spacingBetweenImageAndTitle = 0;
    
    self.screenBtn.imagePosition = QMUIButtonImagePositionRight;
    self.screenBtn.spacingBetweenImageAndTitle = 0;

    [self.synthesizeBtn setTitle:kYQLS(@"综合") forState:(UIControlStateNormal)];
    [self.sellBtn setTitle:kYQLS(@"销量") forState:(UIControlStateNormal)];
    [self.screenBtn setTitle:kYQLS(@"筛选") forState:(UIControlStateNormal)];
    
    [self.synthesizeBtn setImage:YQIMG(@"shop_sall_d_icon") forState:(UIControlStateNormal)];
    [self.sellBtn setImage:YQIMG(@"shop_sall_d_icon") forState:(UIControlStateNormal)];
    
    [self.synthesizeBtn setImage:YQIMG(@"shop_sall_s_icon") forState:(UIControlStateSelected)];
    
    [self.sellBtn setImage:YQIMG(@"shop_sall_s_icon") forState:(UIControlStateSelected)];
    
    [self.screenBtn setImage:YQIMG(@"shop_screen_icon") forState:(UIControlStateNormal)];
}

- (void)setSynthString:(NSString *)sythstr
{
    [self.synthesizeBtn setTitle:sythstr forState:(UIControlStateSelected)];

}

@end


